package apache.numberutil.collections;

/**
 * Created by IntelliJ IDEA.
 * User: liuliwei
 * Date: 2017-06-30
 * Time: 上午9:14
 * Description: ${description}
 */

import com.google.common.base.Function;
import com.google.common.collect.Lists;

import java.util.List;

/**
 *
 */
public class CollectionsTest {
    private String testString = "1";
    {
        testString = "2";
    }
    private static String staticString;
    public static void main(String[] args) {

        List<Integer> integers = Lists.newArrayList(3, 3);
        List<Integer> empty = Lists.newArrayList();
//        System.out.println(empty.addAll(null));
//        System.out.println(Collections.addAll(empty,null));
//        List<Integer> list = null;
//        System.out.println(CollectionUtils.addAll(empty,list.ite));
//        List<Integer> integers1 = [33, 33] ;
        List<Object> transform = Lists.transform(integers, new Function<Integer, Object>() {
            @Override
            public Object apply(Integer input) {
                return input * 3;
            }
        });
        System.out.println(transform);
        System.out.println(integers);

    }

    public synchronized static void show() {
        show();

        try {
            throw new RuntimeException();
        } catch (Exception e){
            System.out.println(e);
        }
    }

}
